#!/bin/sh
nt=`date "+%Y-%m-%d"`
/opt/lagou/servers/hive-2.3.7/bin/hive -e "use azkaban_test;
insert into table user_info select count(DISTINCT id) activenum, TO_DATE(click_time) time  FROM user_clicks WHERE TO_DATE(click_time) = '$nt' GROUP BY TO_DATE(click_time);"
echo "use mydb;insert into table user_info select count(DISTINCT id) activenum, TO_DATE(click_time) time FROM user_clicks WHERE TO_DATE(click_time) = '$nt' GROUP BY TO_DATE(click_time);"

